/**
 * File Comment: message to retrieve all the doctors
 */
package edu.gatech.oad.project.networking.messages.clientMessages; // $codepro.audit.disable packageNamingConvention

import java.util.Arrays;

import edu.gatech.oad.project.coordinator.Office;
import edu.gatech.oad.project.networking.messages.Message;
import edu.gatech.oad.project.networking.messages.serverResponses.getAllDoctorResponse;

/**
 * This message is sent accross the network to the server.
 * 
 * @author James Moore
 * @version 1
 */
public class getAllDoctorMessage extends Message{  // $codepro.audit.disable classNamingConvention
    /**
     * Field serialVersionUID: serialize number
     */
    private static final long serialVersionUID = -6947416190730505664L;

    /**
     * Default constructor
     * 
     * @param token security token
     */
    public getAllDoctorMessage(long token) {
        super(null, token);
    }

    /**
     * Takes the data needed to send back to the client and stores it in the
     * proper response.
     * 
     * @return the response
     */
    @Override
    public Message handle() {
        return new getAllDoctorResponse(Office.CONVERTER.getAllDoctors(), token);
    }

    /**
     * 
     * @return a string
     */
    @Override
    public String toString() {
        return "getAllDoctorMessage [data=" + Arrays.toString(data)
                + ", token=" + token + "]";
    }
    
    
}
